<?php
declare(strict_types=1);

namespace App\Repository\Web;

use App\Repository\BaseRepository;
use App\Model\UserProfile;

class UserProfilesRepository extends BaseRepository
{
    public function __construct(UserProfile $userProfile)
    {
        parent::__construct($userProfile);
    }
    public function updateOrCreateProfile(int $userId, array $profileData): \Hyperf\Database\Model\Model|\Hyperf\DbConnection\Model\Model
    {
        return $this->model->updateOrCreate(['user_id' => $userId], $profileData);
    }
}